package com.whj.serviceorder.remote;

import com.whj.internalcommon.dto.Car;
import com.whj.internalcommon.dto.ResponseResult;
import com.whj.internalcommon.response.OrderDriverResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Auther: wanghaijun
 * @Date: 2023/2/18 - 02 - 18 - 15:10 
 * @Description: com.whj.serviceorder.remote
 */

@FeignClient("service-driver-user")
public interface ServiceDriverUserClient {

    @RequestMapping(method = RequestMethod.GET,value = "/city-driver/is-available-driver")
    ResponseResult<Boolean> isAvailableDriver(@RequestParam String cityCode);

    @RequestMapping(method = RequestMethod.GET,value = "/get-available-driver/{carId}")
    ResponseResult<OrderDriverResponse> getAvailableDriver(@PathVariable("carId") Long carId);

    @RequestMapping(method = RequestMethod.GET,value = "/car")
    ResponseResult<Car> getCarById(@RequestParam Long carId);

}
